home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / ColorSync 2.6 Mac SDK / Interfaces / CMICCProfile.a < prev    next >
Encoding:
Text File  |  1999-05-07  |  31.2 KB  |  786 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMICCProfile.a
  3. ;
  4. ;    Contains:    ICC Profile Format Definitions
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.5
  7. ;                Release:    ColorSync 2.6 SDK for use with Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  18. __CMICCPROFILE__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.  
  24. ;  ICC Profile version constants  
  25.  
  26. cmICCProfileVersion2            EQU        $02000000
  27. cmICCProfileVersion21            EQU        $02100000
  28. cmCS2ProfileVersion                EQU        $02000000
  29. cmCS1ProfileVersion                EQU        $00000100            ; ColorSync 1.0 profile version 
  30. ;  Current Major version number 
  31.  
  32. cmProfileMajorVersionMask        EQU        $FF000000
  33. cmCurrentProfileMajorVersion    EQU        $02000000
  34. ;  magic cookie number for anonymous file ID 
  35.  
  36. cmMagicNumber                    EQU        'acsp'
  37.  
  38. ; ***********************************************************************
  39. ; *************** ColorSync 2.0 profile specification *******************
  40. ; ***********************************************************************
  41. ; *** flags field  ***
  42.  
  43. cmICCReservedFlagsMask            EQU        $0000FFFF            ; these bits of the flags field are defined and reserved by ICC 
  44. cmEmbeddedMask                    EQU        $00000001            ; if bit 0 is 0 then not embedded profile, if 1 then embedded profile 
  45. cmEmbeddedUseMask                EQU        $00000002            ; if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only 
  46. cmCMSReservedFlagsMask            EQU        $FFFF0000            ; these bits of the flags field are defined and reserved by CMS vendor 
  47. cmQualityMask                    EQU        $00030000            ; if bits 16-17 is 0 then normal, if 1 then draft, if 2 then best 
  48. cmInterpolationMask                EQU        $00040000            ; if bit 18 is 0 then interpolation, if 1 then lookup only 
  49. cmGamutCheckingMask                EQU        $00080000            ; if bit 19 is 0 then create gamut checking info, if 1 then no gamut checking info 
  50. ;  copyright-protection flag options 
  51.  
  52. cmEmbeddedProfile                EQU        0                    ; 0 is not embedded profile, 1 is embedded profile 
  53. cmEmbeddedUse                    EQU        1                    ; 0 is to use anywhere, 1 is to use as embedded profile only 
  54. ;  speed and quality flag options 
  55.  
  56. cmNormalMode                    EQU        0                    ; it uses the least significent two bits in the high word of flag 
  57. cmDraftMode                        EQU        1                    ; it should be evaulated like this: right shift 16 bits first, mask off the 
  58. cmBestMode                        EQU        2                    ; high 14 bits, and then compare with the enum to determine the option value 
  59.  
  60. ; *** deviceAttributes fields ***
  61. ;  deviceAttributes[0] is defined by and reserved for device vendors 
  62. ;  deviceAttributes[1] is defined by and reserved for ICC 
  63. ;  The following bits of deviceAttributes[1] are currently defined 
  64.  
  65. cmReflectiveTransparentMask        EQU        $00000001            ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  66. cmGlossyMatteMask                EQU        $00000002            ; if bit 1 is 0 then glossy, if 1 then matte 
  67. ;  device/media attributes element values  
  68.  
  69. cmReflective                    EQU        0                    ; if bit 0 is 0 then reflective media, if 1 then transparency media 
  70. cmGlossy                        EQU        1                    ; if bit 1 is 0 then glossy, if 1 then matte 
  71.  
  72. ; *** renderingIntent field ***
  73.  
  74. cmPerceptual                    EQU        0                    ; Photographic images 
  75. cmRelativeColorimetric            EQU        1                    ; Logo Colors 
  76. cmSaturation                    EQU        2                    ; Business graphics 
  77. cmAbsoluteColorimetric            EQU        3                    ; Logo Colors 
  78.  
  79.  
  80. ;  data type element values 
  81.  
  82. cmAsciiData                        EQU        0
  83. cmBinaryData                    EQU        1
  84. ;  screen encodings  
  85.  
  86. cmPrtrDefaultScreens            EQU        0                    ; Use printer default screens.  0 is false, 1 is ture 
  87. cmLinesPer                        EQU        1                    ; 0 is LinesPerCm, 1 is LinesPerInch 
  88. ;  2.0 tag type information 
  89.  
  90. cmNumHeaderElements                EQU        10
  91. ;  public tags 
  92.  
  93. cmAToB0Tag                        EQU        'A2B0'
  94. cmAToB1Tag                        EQU        'A2B1'
  95. cmAToB2Tag                        EQU        'A2B2'
  96. cmBlueColorantTag                EQU        'bXYZ'
  97. cmBlueTRCTag                    EQU        'bTRC'
  98. cmBToA0Tag                        EQU        'B2A0'
  99. cmBToA1Tag                        EQU        'B2A1'
  100. cmBToA2Tag                        EQU        'B2A2'
  101. cmCalibrationDateTimeTag        EQU        'calt'
  102. cmCharTargetTag                    EQU        'targ'
  103. cmCopyrightTag                    EQU        'cprt'
  104. cmDeviceMfgDescTag                EQU        'dmnd'
  105. cmDeviceModelDescTag            EQU        'dmdd'
  106. cmGamutTag                        EQU        'gamt'
  107. cmGrayTRCTag                    EQU        'kTRC'
  108. cmGreenColorantTag                EQU        'gXYZ'
  109. cmGreenTRCTag                    EQU        'gTRC'
  110. cmLuminanceTag                    EQU        'lumi'
  111. cmMeasurementTag                EQU        'meas'
  112. cmMediaBlackPointTag            EQU        'bkpt'
  113. cmMediaWhitePointTag            EQU        'wtpt'
  114. cmNamedColorTag                    EQU        'ncol'
  115. cmNamedColor2Tag                EQU        'ncl2'
  116. cmPreview0Tag                    EQU        'pre0'
  117. cmPreview1Tag                    EQU        'pre1'
  118. cmPreview2Tag                    EQU        'pre2'
  119. cmProfileDescriptionTag            EQU        'desc'
  120. cmProfileSequenceDescTag        EQU        'pseq'
  121. cmPS2CRD0Tag                    EQU        'psd0'
  122. cmPS2CRD1Tag                    EQU        'psd1'
  123. cmPS2CRD2Tag                    EQU        'psd2'
  124. cmPS2CRD3Tag                    EQU        'psd3'
  125. cmPS2CSATag                        EQU        'ps2s'
  126. cmPS2RenderingIntentTag            EQU        'ps2i'
  127. cmRedColorantTag                EQU        'rXYZ'
  128. cmRedTRCTag                        EQU        'rTRC'
  129. cmScreeningDescTag                EQU        'scrd'
  130. cmScreeningTag                    EQU        'scrn'
  131. cmTechnologyTag                    EQU        'tech'
  132. cmUcrBgTag                        EQU        'bfd '
  133. cmViewingConditionsDescTag        EQU        'vued'
  134. cmViewingConditionsTag            EQU        'view'
  135. ;  custom tags 
  136.  
  137. cmPS2CRDVMSizeTag                EQU        'psvm'
  138. cmVideoCardGammaTag                EQU        'vcgt'
  139. cmMakeAndModelTag                EQU        'mmod'
  140. ;  technology tag descriptions 
  141.  
  142. cmTechnologyFilmScanner            EQU        'fscn'
  143. cmTechnologyReflectiveScanner    EQU        'rscn'
  144. cmTechnologyInkJetPrinter        EQU        'ijet'
  145. cmTechnologyThermalWaxPrinter    EQU        'twax'
  146. cmTechnologyElectrophotographicPrinter EQU 'epho'
  147. cmTechnologyElectrostaticPrinter EQU    'esta'
  148. cmTechnologyDyeSublimationPrinter EQU    'dsub'
  149. cmTechnologyPhotographicPaperPrinter EQU 'rpho'
  150. cmTechnologyFilmWriter            EQU        'fprn'
  151. cmTechnologyVideoMonitor        EQU        'vidm'
  152. cmTechnologyVideoCamera            EQU        'vidc'
  153. cmTechnologyProjectionTelevision EQU    'pjtv'
  154. cmTechnologyCRTDisplay            EQU        'CRT '
  155. cmTechnologyPMDisplay            EQU        'PMD '
  156. cmTechnologyAMDisplay            EQU        'AMD '
  157. cmTechnologyPhotoCD                EQU        'KPCD'
  158. cmTechnologyPhotoImageSetter    EQU        'imgs'
  159. cmTechnologyGravure                EQU        'grav'
  160. cmTechnologyOffsetLithography    EQU        'offs'
  161. cmTechnologySilkscreen            EQU        'silk'
  162. cmTechnologyFlexography            EQU        'flex'
  163. ;  public type signatures 
  164.  
  165. cmSigCurveType                    EQU        'curv'
  166. cmSigDataType                    EQU        'data'
  167. cmSigDateTimeType                EQU        'dtim'
  168. cmSigLut16Type                    EQU        'mft2'
  169. cmSigLut8Type                    EQU        'mft1'
  170. cmSigMeasurementType            EQU        'meas'
  171. cmSigNamedColorType                EQU        'ncol'
  172. cmSigNamedColor2Type            EQU        'ncl2'
  173. cmSigProfileDescriptionType        EQU        'desc'
  174. cmSigScreeningType                EQU        'scrn'
  175. cmSigS15Fixed16Type                EQU        'sf32'
  176. cmSigSignatureType                EQU        'sig '
  177. cmSigTextType                    EQU        'text'
  178. cmSigU16Fixed16Type                EQU        'uf32'
  179. cmSigU1Fixed15Type                EQU        'uf16'
  180. cmSigUInt32Type                    EQU        'ui32'
  181. cmSigUInt64Type                    EQU        'ui64'
  182. cmSigUInt8Type                    EQU        'ui08'
  183. cmSigViewingConditionsType        EQU        'view'
  184. cmSigXYZType                    EQU        'XYZ '
  185. ;  custom type signatures 
  186.  
  187. cmSigVideoCardGammaType            EQU        'vcgt'
  188. cmSigMakeAndModelType            EQU        'mmod'
  189.  
  190. ;  Measurement type encodings 
  191. ;  Measurement Flare 
  192.  
  193. cmFlare0                        EQU        $00000000
  194. cmFlare100                        EQU        $00000001
  195. ;  Measurement Geometry    
  196.  
  197. cmGeometryUnknown                EQU        $00000000
  198. cmGeometry045or450                EQU        $00000001
  199. cmGeometry0dord0                EQU        $00000002
  200. ;  Standard Observer    
  201.  
  202. cmStdobsUnknown                    EQU        $00000000
  203. cmStdobs1931TwoDegrees            EQU        $00000001
  204. cmStdobs1964TenDegrees            EQU        $00000002
  205. ;  Standard Illuminant 
  206.  
  207. cmIlluminantUnknown                EQU        $00000000
  208. cmIlluminantD50                    EQU        $00000001
  209. cmIlluminantD65                    EQU        $00000002
  210. cmIlluminantD93                    EQU        $00000003
  211. cmIlluminantF2                    EQU        $00000004
  212. cmIlluminantD55                    EQU        $00000005
  213. cmIlluminantA                    EQU        $00000006
  214. cmIlluminantEquiPower            EQU        $00000007
  215. cmIlluminantF8                    EQU        $00000008
  216. ;  Spot Function Value 
  217.  
  218. cmSpotFunctionUnknown            EQU        0
  219. cmSpotFunctionDefault            EQU        1
  220. cmSpotFunctionRound                EQU        2
  221. cmSpotFunctionDiamond            EQU        3
  222. cmSpotFunctionEllipse            EQU        4
  223. cmSpotFunctionLine                EQU        5
  224. cmSpotFunctionSquare            EQU        6
  225. cmSpotFunctionCross                EQU        7
  226. ;  Color Space Signatures 
  227.  
  228. cmXYZData                        EQU        'XYZ '
  229. cmLabData                        EQU        'Lab '
  230. cmLuvData                        EQU        'Luv '
  231. cmYxyData                        EQU        'Yxy '
  232. cmRGBData                        EQU        'RGB '
  233. cmGrayData                        EQU        'GRAY'
  234. cmHSVData                        EQU        'HSV '
  235. cmHLSData                        EQU        'HLS '
  236. cmCMYKData                        EQU        'CMYK'
  237. cmCMYData                        EQU        'CMY '
  238. cmMCH5Data                        EQU        'MCH5'
  239. cmMCH6Data                        EQU        'MCH6'
  240. cmMCH7Data                        EQU        'MCH7'
  241. cmMCH8Data                        EQU        'MCH8'
  242. cm3CLRData                        EQU        '3CLR'
  243. cm4CLRData                        EQU        '4CLR'
  244. cm5CLRData                        EQU        '5CLR'
  245. cm6CLRData                        EQU        '6CLR'
  246. cm7CLRData                        EQU        '7CLR'
  247. cm8CLRData                        EQU        '8CLR'
  248. cmNamedData                        EQU        'NAME'
  249. ;  profileClass enumerations 
  250.  
  251. cmInputClass                    EQU        'scnr'
  252. cmDisplayClass                    EQU        'mntr'
  253. cmOutputClass                    EQU        'prtr'
  254. cmLinkClass                        EQU        'link'
  255. cmAbstractClass                    EQU        'abst'
  256. cmColorSpaceClass                EQU        'spac'
  257. cmNamedColorClass                EQU        'nmcl'
  258. ;  platform enumerations 
  259.  
  260. cmMacintosh                        EQU        'APPL'
  261. cmMicrosoft                        EQU        'MSFT'
  262. cmSolaris                        EQU        'SUNW'
  263. cmSiliconGraphics                EQU        'SGI '
  264. cmTaligent                        EQU        'TGNT'
  265. ;  ColorSync 1.0 elements 
  266.  
  267. cmCS1ChromTag                    EQU        'chrm'
  268. cmCS1TRCTag                        EQU        'trc '
  269. cmCS1NameTag                    EQU        'name'
  270. cmCS1CustTag                    EQU        'cust'
  271. ;  General element data types 
  272. CMDateTime                RECORD 0
  273. year                     ds.w    1                ; offset: $0 (0)
  274. month                     ds.w    1                ; offset: $2 (2)
  275. dayOfTheMonth             ds.w    1                ; offset: $4 (4)
  276. hours                     ds.w    1                ; offset: $6 (6)
  277. minutes                     ds.w    1                ; offset: $8 (8)
  278. seconds                     ds.w    1                ; offset: $A (10)
  279. sizeof                     EQU *                    ; size:   $C (12)
  280.                         ENDR
  281. CMFixedXYZColor            RECORD 0
  282. X                         ds.l    1                ; offset: $0 (0)
  283. Y                         ds.l    1                ; offset: $4 (4)
  284. Z                         ds.l    1                ; offset: $8 (8)
  285. sizeof                     EQU *                    ; size:   $C (12)
  286.                         ENDR
  287. ; typedef unsigned short                 CMXYZComponent
  288.  
  289. CMXYZColor                RECORD 0
  290. X                         ds.w    1                ; offset: $0 (0)
  291. Y                         ds.w    1                ; offset: $2 (2)
  292. Z                         ds.w    1                ; offset: $4 (4)
  293. sizeof                     EQU *                    ; size:   $6 (6)
  294.                         ENDR
  295. CM2Header                RECORD 0
  296. size                     ds.l    1                ; offset: $0 (0)        ;  This is the total size of the Profile 
  297. CMMType                     ds.l    1                ; offset: $4 (4)        ;  CMM signature,  Registered with CS2 consortium  
  298. profileVersion             ds.l    1                ; offset: $8 (8)        ;  Version of CMProfile format 
  299. profileClass             ds.l    1                ; offset: $C (12)        ;  input, display, output, devicelink, abstract, or color conversion profile type 
  300. dataColorSpace             ds.l    1                ; offset: $10 (16)        ;  color space of data 
  301. profileConnectionSpace     ds.l    1                ; offset: $14 (20)        ;  profile connection color space 
  302. dateTime                 ds        CMDateTime        ; offset: $18 (24)        ;  date and time of profile creation 
  303. CS2profileSignature         ds.l    1                ; offset: $24 (36)        ;  'acsp' constant ColorSync 2.0 file ID 
  304. platform                 ds.l    1                ; offset: $28 (40)        ;  primary profile platform, Registered with CS2 consortium 
  305. flags                     ds.l    1                ; offset: $2C (44)        ;  profile flags 
  306. deviceManufacturer         ds.l    1                ; offset: $30 (48)        ;  Registered with ICC consortium 
  307. deviceModel                 ds.l    1                ; offset: $34 (52)        ;  Registered with ICC consortium 
  308. deviceAttributes         ds.l    2                ; offset: $38 (56)        ;  Attributes[0] is for device vendors, [1] is for ICC 
  309. renderingIntent             ds.l    1                ; offset: $40 (64)        ;  preferred rendering intent of tagged object 
  310. white                     ds        CMFixedXYZColor ; offset: $44 (68)        ;  profile illuminant 
  311. creator                     ds.l    1                ; offset: $50 (80)        ;  profile creator 
  312. reserved                 ds.b    44                ; offset: $54 (84)        ;  reserved for future use 
  313. sizeof                     EQU *                    ; size:   $80 (128)
  314.                         ENDR
  315. CMTagRecord                RECORD 0
  316. tag                         ds.l    1                ; offset: $0 (0)        ;  Registered with CS2 consortium 
  317. elementOffset             ds.l    1                ; offset: $4 (4)        ;  Relative to start of CMProfile 
  318. elementSize                 ds.l    1                ; offset: $8 (8)
  319. sizeof                     EQU *                    ; size:   $C (12)
  320.                         ENDR
  321. CMTagElemTable            RECORD 0
  322. count                     ds.l    1                ; offset: $0 (0)
  323. tagList                     ds        CMTagRecord        ; offset: $4 (4) <-- really an array of length one ;  Variable size 
  324. sizeof                     EQU *                    ; size:   $10 (16)
  325.                         ENDR
  326. ;  External 0x02002001 CMProfile 
  327. CM2Profile                RECORD 0
  328. header                     ds        CM2Header        ; offset: $0 (0)
  329. tagTable                 ds        CMTagElemTable ; offset: $80 (128)
  330. elemData                 ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  Tagged element storage. Variable size 
  331.                          ORG 146
  332. sizeof                     EQU *                    ; size:   $92 (146)
  333.                         ENDR
  334. ; typedef struct CM2Profile *            CM2ProfilePtr
  335.  
  336. ; typedef CM2ProfilePtr *                CM2ProfileHandle
  337.  
  338. ;  Tag Type Definitions 
  339. CMCurveType                RECORD 0
  340. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'curv' 
  341. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  342. countValue                 ds.l    1                ; offset: $8 (8)        ;  number of entries in table that follows 
  343. data                     ds.w    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  344. sizeof                     EQU *                    ; size:   $E (14)
  345.                         ENDR
  346. CMDataType                RECORD 0
  347. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'data' 
  348. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  349. dataFlag                 ds.l    1                ; offset: $8 (8)        ;  0 = ASCII, 1 = binary 
  350. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  Tagged element storage. Variable size 
  351.                          ORG 14
  352. sizeof                     EQU *                    ; size:   $E (14)
  353.                         ENDR
  354. CMDateTimeType            RECORD 0
  355. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'dtim' 
  356. reserved                 ds.l    1                ; offset: $4 (4)
  357. dateTime                 ds        CMDateTime        ; offset: $8 (8)
  358. sizeof                     EQU *                    ; size:   $14 (20)
  359.                         ENDR
  360. CMLut16Type                RECORD 0
  361. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft2' 
  362. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  363. inputChannels             ds.b    1                ; offset: $8 (8)        ;  Number of input channels 
  364. outputChannels             ds.b    1                ; offset: $9 (9)        ;  Number of output channels 
  365. gridPoints                 ds.b    1                ; offset: $A (10)        ;  Number of clutTable grid points 
  366. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  367. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  368. inputTableEntries         ds.w    1                ; offset: $30 (48)        ;  
  369. outputTableEntries         ds.w    1                ; offset: $32 (50)        ;  
  370. inputTable                 ds.w    1                ; offset: $34 (52) <-- really an array of length one ;  Variable size 
  371. CLUT                     ds.w    1                ; offset: $36 (54) <-- really an array of length one ;  Variable size 
  372. outputTable                 ds.w    1                ; offset: $38 (56) <-- really an array of length one ;  Variable size 
  373. sizeof                     EQU *                    ; size:   $3A (58)
  374.                         ENDR
  375. CMLut8Type                RECORD 0
  376. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mft1' 
  377. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  378. inputChannels             ds.b    1                ; offset: $8 (8)        ;  
  379. outputChannels             ds.b    1                ; offset: $9 (9)        ;  
  380. gridPoints                 ds.b    1                ; offset: $A (10)        ;  
  381. reserved2                 ds.b    1                ; offset: $B (11)        ;  fill with 0x00 
  382. matrix                     ds.l    3 * 3            ; offset: $C (12)        ;  
  383. inputTable                 ds.b    256                ; offset: $30 (48)        ;  fixed size of 256 
  384. CLUT                     ds.b    2                ; offset: $130 (304)    ;  Variable size 
  385. outputTable                 ds.b    256                ; offset: $132 (306)    ;  fixed size of 256 
  386. sizeof                     EQU *                    ; size:   $232 (562)
  387.                         ENDR
  388. CMMeasurementType        RECORD 0
  389. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'meas' 
  390. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  391. standardObserver         ds.l    1                ; offset: $8 (8)        ;  0 : unknown, 1 : CIE 1931, 2 : CIE 1964 
  392. backingXYZ                 ds        CMFixedXYZColor ; offset: $C (12)        ;  absolute XYZ values of backing 
  393. geometry                 ds.l    1                ; offset: $18 (24)        ;  0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0 
  394. flare                     ds.l    1                ; offset: $1C (28)        ;  0 : 0%, 1 : 100% flare 
  395. illuminant                 ds.l    1                ; offset: $20 (32)        ;  standard illuminant 
  396. sizeof                     EQU *                    ; size:   $24 (36)
  397.                         ENDR
  398. CMNamedColorType        RECORD 0
  399. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncol' 
  400. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  401. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  
  402. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  403. prefixName                 ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  Variable size, max = 32, to access fields after this one, have to count bytes 
  404. suffixName                 ds.b    1                ; offset: $11 (17) <-- really an array of length one ;  Variable size, max = 32 
  405. data                     ds.b    1                ; offset: $12 (18) <-- really an array of length one ;  varaible size data as explained below 
  406.                          ORG 20
  407. sizeof                     EQU *                    ; size:   $14 (20)
  408.                         ENDR
  409. ;     
  410. ;    A variable size array of structs appears as the last block of data
  411. ;    in the above struct, CMNamedColorType.  The data structure
  412. ;    is as follows: (example in C)
  413. ;    
  414. ;    struct {                                             
  415. ;        unsigned char    rootName[1];                 * Variable size, max = 32 
  416. ;        unsigned char    colorCoords[1];                 * Variable size  
  417. ;    } colorName[1];                                     * Variable size  
  418. ;
  419.  
  420. CMNamedColor2Type        RECORD 0
  421. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ncl2' 
  422. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  423. vendorFlag                 ds.l    1                ; offset: $8 (8)        ;  lower 16 bits reserved for ICC use 
  424. count                     ds.l    1                ; offset: $C (12)        ;  count of named colors in array that follows 
  425. deviceChannelCount         ds.l    1                ; offset: $10 (16)        ;  number of device channels, 0 indicates no device value available 
  426. prefixName                 ds.b    32                ; offset: $14 (20)        ;  32 byte field.  7 bit ASCII null terminated 
  427. suffixName                 ds.b    32                ; offset: $34 (52)        ;  32 byte field.  7 bit ASCII null terminated 
  428. data                     ds.b    1                ; offset: $54 (84) <-- really an array of length one ;  varaible size data as definced below 
  429.                          ORG 86
  430. sizeof                     EQU *                    ; size:   $56 (86)
  431.                         ENDR
  432. CMNamedColor2EntryType    RECORD 0
  433. rootName                 ds.b    32                ; offset: $0 (0)        ;  32 byte field.  7 bit ASCII null terminated 
  434. PCSColorCoords             ds.w    3                ; offset: $20 (32)        ;  Lab or XYZ color 
  435. DeviceColorCoords         ds.w    1                ; offset: $26 (38) <-- really an array of length one ;  Variable size 
  436. sizeof                     EQU *                    ; size:   $28 (40)
  437.                         ENDR
  438. CMTextDescriptionType    RECORD 0
  439. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'desc' 
  440. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  441. ASCIICount                 ds.l    1                ; offset: $8 (8)        ;  the count of "bytes" 
  442. ASCIIName                 ds.b    2                ; offset: $C (12)        ;  Variable size, to access fields after this one, have to count bytes 
  443. UniCodeCode                 ds.l    1                ; offset: $E (14)
  444. UniCodeCount             ds.l    1                ; offset: $12 (18)        ;  the count of characters, each character has two bytes 
  445. UniCodeName                 ds.b    2                ; offset: $16 (22)        ;  Variable size 
  446. ScriptCodeCode             ds.w    1                ; offset: $18 (24)
  447. ScriptCodeCount             ds.b    1                ; offset: $1A (26)        ;  the count of "bytes" 
  448.                          ORG 28
  449. ScriptCodeName             ds.b    2                ; offset: $1C (28)        ;  Variable size 
  450. sizeof                     EQU *                    ; size:   $1E (30)
  451.                         ENDR
  452. CMTextType                RECORD 0
  453. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'text' 
  454. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  455. text                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  count of text is obtained from tag size element 
  456.                          ORG 10
  457. sizeof                     EQU *                    ; size:   $A (10)
  458.                         ENDR
  459. CMScreeningType            RECORD 0
  460. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'scrn' 
  461. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  462. screeningFlag             ds.l    1                ; offset: $8 (8)        ;  bit 0 : use printer default screens, bit 1 : inch/cm 
  463. channelCount             ds.l    1                ; offset: $C (12)
  464. data                     ds.b    1                ; offset: $10 (16) <-- really an array of length one ;  varaible size data as explained below 
  465.                          ORG 18
  466. sizeof                     EQU *                    ; size:   $12 (18)
  467.                         ENDR
  468. ;    A variable size array of structs appears as the last block of data
  469. ;    in the above struct, CMScreeningType.  The data structure
  470. ;    is as follows: (example in C)
  471. ;    
  472. ;    struct {
  473. ;        Fixed            frequency;
  474. ;        Fixed            angle;
  475. ;        unsigned long    sportFunction;
  476. ;     }    channelScreening[1];                        * Variable size 
  477. ;
  478.  
  479. CMSignatureType            RECORD 0
  480. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sig ' 
  481. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  482. signature                 ds.l    1                ; offset: $8 (8)
  483. sizeof                     EQU *                    ; size:   $C (12)
  484.                         ENDR
  485. CMS15Fixed16ArrayType    RECORD 0
  486. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'sf32' 
  487. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  488. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  489. sizeof                     EQU *                    ; size:   $C (12)
  490.                         ENDR
  491. CMU16Fixed16ArrayType    RECORD 0
  492. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'uf32' 
  493. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  494. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  495. sizeof                     EQU *                    ; size:   $C (12)
  496.                         ENDR
  497. CMUInt16ArrayType        RECORD 0
  498. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui16' 
  499. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  500. value                     ds.w    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  501. sizeof                     EQU *                    ; size:   $A (10)
  502.                         ENDR
  503. CMUInt32ArrayType        RECORD 0
  504. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui32' 
  505. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  506. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  507. sizeof                     EQU *                    ; size:   $C (12)
  508.                         ENDR
  509. CMUInt64ArrayType        RECORD 0
  510. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui64' 
  511. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  512. value                     ds.l    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size (x2) 
  513. sizeof                     EQU *                    ; size:   $C (12)
  514.                         ENDR
  515. CMUInt8ArrayType        RECORD 0
  516. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'ui08' 
  517. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  518. value                     ds.b    1                ; offset: $8 (8) <-- really an array of length one ;  Variable size 
  519.                          ORG 10
  520. sizeof                     EQU *                    ; size:   $A (10)
  521.                         ENDR
  522. CMViewingConditionsType    RECORD 0
  523. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'view' 
  524. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  525. illuminant                 ds        CMFixedXYZColor ; offset: $8 (8)        ;  absolute XYZs of illuminant  in cd/m^2 
  526. surround                 ds        CMFixedXYZColor ; offset: $14 (20)        ;  absolute XYZs of surround in cd/m^2 
  527. stdIlluminant             ds.l    1                ; offset: $20 (32)        ;  see definitions of std illuminants 
  528. sizeof                     EQU *                    ; size:   $24 (36)
  529.                         ENDR
  530. CMXYZType                RECORD 0
  531. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'XYZ ' 
  532. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  533. XYZ                         ds        CMFixedXYZColor ; offset: $8 (8) <-- really an array of length one ;  variable size XYZ tristimulus values 
  534. sizeof                     EQU *                    ; size:   $14 (20)
  535.                         ENDR
  536. ;  Profile sequence description type 
  537. CMProfileSequenceDescType RECORD 0
  538. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'pseq ' 
  539. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  540. count                     ds.l    1                ; offset: $8 (8)        ;  Number of descriptions 
  541. data                     ds.b    1                ; offset: $C (12) <-- really an array of length one ;  varaible size data as explained below 
  542.                          ORG 14
  543. sizeof                     EQU *                    ; size:   $E (14)
  544.                         ENDR
  545. ;    A variable size array of structs appears as the last block of data
  546. ;    in the above struct, CMProfileSequenceDescType.  The data structure
  547. ;    is as follows: (example in C)
  548. ;    
  549. ;    struct {                                             
  550. ;        OSType            deviceMfg;                     * Device Manufacturer 
  551. ;        OSType            deviceModel;                 * Decvice Model 
  552. ;        unsigned long    attributes[2];                 * Device attributes 
  553. ;        OSType            technology;                     * Technology signature 
  554. ;        unsigned long    mfgDescASCIICount;             * the count of "bytes" 
  555. ;        unsigned char    mfgDescASCIIName[2];         * Variable size 
  556. ;        unsigned long    mfgDescUniCodeCode;             
  557. ;        unsigned long    mfgDescUniCodeCount;         * the count of characters, each character has two bytes 
  558. ;        unsigned char    mfgDescUniCodeName[2];         * Variable size 
  559. ;        unsigned long    mfgDescScriptCodeCode;         
  560. ;        unsigned long    mfgDescScriptCodeCount;         * the count of "bytes" 
  561. ;        unsigned char    mfgDescScriptCodeName[2];     * Variable size 
  562. ;        unsigned long    modelDescASCIICount;         * the count of "bytes" 
  563. ;        unsigned char    modelDescASCIIName[2];         * Variable size 
  564. ;        unsigned long    modelDescUniCodeCode;         
  565. ;        unsigned long    modelDescUniCodeCount;         * the count of characters, each character has two bytes 
  566. ;        unsigned char    modelDescUniCodeName[2];     * Variable size 
  567. ;        short            modelDescScriptCodeCode;     
  568. ;        unsigned char    modelDescScriptCodeCount;     * the count of "bytes" 
  569. ;        SInt8            filler;                         * For proper alignment across languages 
  570. ;        unsigned char    modelDescScriptCodeName[2];     * Variable size 
  571. ;    }    profileDescription[1];                         
  572. ;
  573.  
  574.  
  575. ;  Under color removal, black generation type 
  576. CMUcrBgType                RECORD 0
  577. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'bfd  ' 
  578. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  579. ucrCount                 ds.l    1                ; offset: $8 (8)        ;  Number of UCR entries 
  580. ucrValues                 ds.w    1                ; offset: $C (12) <-- really an array of length one ;  variable size 
  581. bgCount                     ds.l    1                ; offset: $E (14)        ;  Number of BG entries 
  582. bgValues                 ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  variable size 
  583. ucrbgASCII                 ds.b    1                ; offset: $14 (20) <-- really an array of length one ;  null terminated ASCII string 
  584.                          ORG 22
  585. sizeof                     EQU *                    ; size:   $16 (22)
  586.                         ENDR
  587. CMIntentCRDVMSize        RECORD 0
  588. renderingIntent             ds.l    1                ; offset: $0 (0)        ;  rendering intent 
  589. VMSize                     ds.l    1                ; offset: $4 (4)        ;  VM size taken up by the CRD 
  590. sizeof                     EQU *                    ; size:   $8 (8)
  591.                         ENDR
  592. CMPS2CRDVMSizeType        RECORD 0
  593. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'psvm' 
  594. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  595. count                     ds.l    1                ; offset: $8 (8)        ;  number of intent entries 
  596. intentCRD                 ds        CMIntentCRDVMSize ; offset: $C (12) <-- really an array of length one ;  variable size 
  597. sizeof                     EQU *                    ; size:   $14 (20)
  598.                         ENDR
  599. ;  Video Card Gamma type 
  600.  
  601. cmVideoCardGammaTableType        EQU        0
  602. cmVideoCardGammaFormulaType        EQU        1
  603.  
  604. CMVideoCardGammaTable    RECORD 0
  605. channels                 ds.w    1                ; offset: $0 (0)        ;  # of gamma channels (1 or 3) 
  606. entryCount                 ds.w    1                ; offset: $2 (2)        ;  1-based number of entries per channel 
  607. entrySize                 ds.w    1                ; offset: $4 (4)        ;  size on bytes of each entry 
  608. data                     ds.b    1                ; offset: $6 (6) <-- really an array of length one ;  variable size data follows 
  609.                          ORG 8
  610. sizeof                     EQU *                    ; size:   $8 (8)
  611.                         ENDR
  612. CMVideoCardGammaFormula    RECORD 0
  613. redGamma                 ds.l    1                ; offset: $0 (0)        ;  must be > 0.0 
  614. redMin                     ds.l    1                ; offset: $4 (4)        ;  must be > 0.0 and < 1.0 
  615. redMax                     ds.l    1                ; offset: $8 (8)        ;  must be > 0.0 and < 1.0 
  616. greenGamma                 ds.l    1                ; offset: $C (12)        ;  must be > 0.0 
  617. greenMin                 ds.l    1                ; offset: $10 (16)        ;  must be > 0.0 and < 1.0 
  618. greenMax                 ds.l    1                ; offset: $14 (20)        ;  must be > 0.0 and < 1.0 
  619. blueGamma                 ds.l    1                ; offset: $18 (24)        ;  must be > 0.0 
  620. blueMin                     ds.l    1                ; offset: $1C (28)        ;  must be > 0.0 and < 1.0 
  621. blueMax                     ds.l    1                ; offset: $20 (32)        ;  must be > 0.0 and < 1.0 
  622. sizeof                     EQU *                    ; size:   $24 (36)
  623.                         ENDR
  624. CMVideoCardGamma        RECORD 0
  625. tagType                     ds.l    1                ; offset: $0 (0)
  626. table                     ds        CMVideoCardGammaTable ; offset: $4 (4)
  627.                          ORG 4
  628. formula                     ds        CMVideoCardGammaFormula ; offset: $4 (4)
  629. sizeof                     EQU *                    ; size:   $28 (40)
  630.                         ENDR
  631. CMVideoCardGammaType    RECORD 0
  632. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'vcgt' 
  633. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  634. gamma                     ds        CMVideoCardGamma ; offset: $8 (8)
  635. sizeof                     EQU *                    ; size:   $30 (48)
  636.                         ENDR
  637. CMMakeAndModel            RECORD 0
  638. manufacturer             ds.l    1                ; offset: $0 (0)
  639. model                     ds.l    1                ; offset: $4 (4)
  640. serialNumber             ds.l    1                ; offset: $8 (8)
  641. manufactureDate             ds.l    1                ; offset: $C (12)
  642. reserved1                 ds.l    1                ; offset: $10 (16)        ;  fill with 0x00 
  643. reserved2                 ds.l    1                ; offset: $14 (20)        ;  fill with 0x00 
  644. reserved3                 ds.l    1                ; offset: $18 (24)        ;  fill with 0x00 
  645. reserved4                 ds.l    1                ; offset: $1C (28)        ;  fill with 0x00 
  646. sizeof                     EQU *                    ; size:   $20 (32)
  647.                         ENDR
  648. CMMakeAndModelType        RECORD 0
  649. typeDescriptor             ds.l    1                ; offset: $0 (0)        ;  'mmod' 
  650. reserved                 ds.l    1                ; offset: $4 (4)        ;  fill with 0x00 
  651. makeAndModel             ds        CMMakeAndModel ; offset: $8 (8)
  652. sizeof                     EQU *                    ; size:   $28 (40)
  653.                         ENDR
  654. ; ***********************************************************************
  655. ; *************** ColorSync 1.0 profile specification *******************
  656. ; ***********************************************************************
  657.  
  658. cmGrayResponse                    EQU        0
  659. cmRedResponse                    EQU        1
  660. cmGreenResponse                    EQU        2
  661. cmBlueResponse                    EQU        3
  662. cmCyanResponse                    EQU        4
  663. cmMagentaResponse                EQU        5
  664. cmYellowResponse                EQU        6
  665. cmUcrResponse                    EQU        7
  666. cmBgResponse                    EQU        8
  667. cmOnePlusLastResponse            EQU        9
  668.  
  669. ;  Device types 
  670.  
  671. cmMonitorDevice                    EQU        'mntr'
  672. cmScannerDevice                    EQU        'scnr'
  673. cmPrinterDevice                    EQU        'prtr'
  674.  
  675. CMIString                RECORD 0
  676. theScript                 ds.w    1                ; offset: $0 (0)
  677. theString                 ds        Str63            ; offset: $2 (2)
  678. sizeof                     EQU *                    ; size:   $42 (66)
  679.                         ENDR
  680. ;  Profile options 
  681.  
  682. cmPerceptualMatch                EQU        $0000                ; Default. For photographic images 
  683. cmColorimetricMatch                EQU        $0001                ; Exact matching when possible 
  684. cmSaturationMatch                EQU        $0002                ; For solid colors 
  685. ;  Profile flags 
  686.  
  687. cmNativeMatchingPreferred        EQU        $00000001            ; Default to native not preferred 
  688. cmTurnOffCache                    EQU        $00000002            ; Default to turn on CMM cache 
  689. ; typedef long                             CMMatchOption
  690.  
  691. ; typedef long                             CMMatchFlag
  692.  
  693. CMHeader                RECORD 0
  694. size                     ds.l    1                ; offset: $0 (0)
  695. CMMType                     ds.l    1                ; offset: $4 (4)
  696. applProfileVersion         ds.l    1                ; offset: $8 (8)
  697. dataType                 ds.l    1                ; offset: $C (12)
  698. deviceType                 ds.l    1                ; offset: $10 (16)
  699. deviceManufacturer         ds.l    1                ; offset: $14 (20)
  700. deviceModel                 ds.l    1                ; offset: $18 (24)
  701. deviceAttributes         ds.l    2                ; offset: $1C (28)
  702. profileNameOffset         ds.l    1                ; offset: $24 (36)
  703. customDataOffset         ds.l    1                ; offset: $28 (40)
  704. flags                     ds.l    1                ; offset: $2C (44)
  705. options                     ds.l    1                ; offset: $30 (48)
  706. white                     ds        CMXYZColor        ; offset: $34 (52)
  707. black                     ds        CMXYZColor        ; offset: $3A (58)
  708. sizeof                     EQU *                    ; size:   $40 (64)
  709.                         ENDR
  710. CMProfileChromaticities    RECORD 0
  711. red                         ds        CMXYZColor        ; offset: $0 (0)
  712. green                     ds        CMXYZColor        ; offset: $6 (6)
  713. blue                     ds        CMXYZColor        ; offset: $C (12)
  714. cyan                     ds        CMXYZColor        ; offset: $12 (18)
  715. magenta                     ds        CMXYZColor        ; offset: $18 (24)
  716. yellow                     ds        CMXYZColor        ; offset: $1E (30)
  717. sizeof                     EQU *                    ; size:   $24 (36)
  718.                         ENDR
  719. CMProfileResponse        RECORD 0
  720. counts                     ds.w    9                ; offset: $0 (0)
  721. data                     ds.w    1                ; offset: $12 (18) <-- really an array of length one ;  Variable size 
  722. sizeof                     EQU *                    ; size:   $14 (20)
  723.                         ENDR
  724. CMProfile                RECORD 0
  725. header                     ds        CMHeader        ; offset: $0 (0)
  726. profile                     ds        CMProfileChromaticities ; offset: $40 (64)
  727. response                 ds        CMProfileResponse ; offset: $64 (100)
  728. profileName                 ds        CMIString        ; offset: $78 (120)
  729. customData                 ds.b    1                ; offset: $BA (186) <-- really an array of length one ;  Variable size 
  730.                          ORG 188
  731. sizeof                     EQU *                    ; size:   $BC (188)
  732.                         ENDR
  733. ; typedef struct CMProfile *            CMProfilePtr
  734.  
  735. ; typedef CMProfilePtr *                CMProfileHandle
  736.  
  737.     IF OLDROUTINENAMES THEN
  738.  
  739. kCMApplProfileVersion            EQU        $00000100
  740.  
  741. grayResponse                    EQU        0
  742. redResponse                        EQU        1
  743. greenResponse                    EQU        2
  744. blueResponse                    EQU        3
  745. cyanResponse                    EQU        4
  746. magentaResponse                    EQU        5
  747. yellowResponse                    EQU        6
  748. ucrResponse                        EQU        7
  749. bgResponse                        EQU        8
  750. onePlusLastResponse                EQU        9
  751.  
  752. rgbData                            EQU        'RGB '
  753. cmykData                        EQU        'CMYK'
  754. grayData                        EQU        'GRAY'
  755. xyzData                            EQU        'XYZ '
  756.  
  757. monitorDevice                    EQU        'mntr'
  758. scannerDevice                    EQU        'scnr'
  759. printerDevice                    EQU        'prtr'
  760. ; typedef unsigned short                 XYZComponent
  761.  
  762. XYZColor                RECORD 0
  763. f                         ds        CMXYZColor
  764. sizeof                     EQU *                    ; size:   $6 (6)
  765.                         ENDR
  766.  
  767.  
  768. ; typedef unsigned short                 CMResponseData
  769.  
  770. IString                    RECORD 0
  771. f                         ds        CMIString
  772. sizeof                     EQU *                    ; size:   $42 (66)
  773.                         ENDR
  774.  
  775.  
  776. ; typedef long                             CMResponseColor
  777.  
  778. ; typedef CMResponseColor                 responseColor
  779.  
  780.     ENDIF    ; OLDROUTINENAMES
  781.  
  782.     ENDIF ; __CMICCPROFILE__ 
  783.  
  784.